/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.lista05;

import org.hibernate.Session;
import util.HibernateUtil;

/**
 *
 * @author Mendel
 */
public abstract class DAOFactory {
    public static final int MYSQL = 1;
    public static final int POSTGREE = 2;
    
    public static DAOFactory getDAOFactory(int db){
        switch(db)
	{			
            case MYSQL:
            	return new MySQLDAO();
            case POSTGREE:
            	return new PostgreDAO();
            default:
                return null;	
	}	
    }
    public abstract Session getSession();
    public abstract boolean cadastrarTarefa(int opcaoTipoTarefa, int opcaoTarefa) 
           throws LotadoException, ImportanciaException;
    public abstract boolean removerTarefa(int codTarefa)
           throws SemTarefaException;
    public abstract TarefaTO consultarTarefa(int codigo)
            throws SemTarefaException;
    public abstract TarefaTO[] listarTarefa();
    public abstract boolean iniciarTarefa(int codigo)
            throws SemTarefaException;
    public abstract boolean encerrarTarefa(int codigo, double wValorCobrado)
            throws SemTarefaException;
    public abstract boolean alterarImportancia(int codigo, int wOpcao)
            throws SemTarefaException;
    public abstract boolean cancelarTarefa(int codigo)
            throws SemTarefaException; 
}
